/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.univali.sindico.dao;

import br.univali.sindico.entity.Morador;
import org.hibernate.Session;

/**
 *
 * @author Fernando
 */
public class MoradorDAO extends GenericDAO<Morador> {
    
    public Morador getById(int id){
    Session session = sessionFactory.openSession(); 
    try {
      return (Morador) session.get(Morador.class, id);
    } finally {
      session.close();
    }    
}
}
